package com.h2cloud.condition;

import net.sf.jsqlparser.expression.operators.arithmetic.Addition;
import net.sf.jsqlparser.expression.operators.arithmetic.Division;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.Callable;

/**
 * @Package: com.h2cloud.condition
 * @ClassName: OperatorFactory
 * @Author: h2cloud
 * @CreateTime: 2023/3/10 11:55 下午
 * @Description:
 */
public class OperatorFactory {
	Context context;
	static Map<String, Callable<List<String>>> operationMap = new HashMap();

	public OperatorFactory() {

	}

	public OperatorFactory(Context c) {
		this.context = c;
	}

	public List<String> getOperation(String operator) {
		List<String> res = null;
		try {
			res = operationMap.get(operator).call();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return filter(res);
	}

	public List<String> filter(List<String> res) {
		return res;
	}
}
